package csc.training.jsf2.dao;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

import csc.training.jsf2.entity.Account;
import csc.training.jsf2.entity.EmailInfo;


/**
 * 
 * @author hdang20
 *
 */
@ManagedBean
@SessionScoped
public class MailSystemDaoImpl implements MailSystemDao, Serializable{
	private static final long serialVersionUID = 3601820450618369949L;
	private List<EmailInfo> emails = null;
	public List<Account> getAccounts(){
		List<Account> accounts = new ArrayList<Account>();
		accounts.add(new Account("Huynh","Dang","hdang20@csc.com","P@ssword","Vietnam","Ho Chi Minh","0903853803", null));
		
		return accounts;
	}
	
	public List<EmailInfo> getEmails(){
		if(emails == null){
			emails = new LinkedList<EmailInfo>();
			emails.add(new EmailInfo(0,"Huynh T Dang","2010-11-09 9:21 AM", "Code Review er7.5", "Not_Yet_Read"));
			emails.add(new EmailInfo(1,"Long Q Truong","11/10/2010 10:04 AM", "Security WOW Program for 2010 - Week #3", "Read"));
			emails.add(new EmailInfo(2,"CSC Global Sametime Operations","11/09/2010 07:42 PM", "UPDATE - Sametime Outage - November 9, 2010", "Not_Yet_Read"));
			emails.add(new EmailInfo(3,"Kevin Schlumpf","11/08/2010 11:24 PM", "Agile training - reminder", "Read"));
			emails.add(new EmailInfo(4,"Chau T Bui","11/08/2010 10:04 AM", "Notice to NT employees only", "Read"));
			emails.add(new EmailInfo(5,"Annlouise Williams","11/05/2010 01:39 AM", "Task Turnaround Sheet 7.5", "Read"));
			emails.add(new EmailInfo(6,"Vinh Q Dang","11/05/2010 01:57 PM", "Entertainment Activities", "Read"));
			emails.add(new EmailInfo(7,"Khanh T Lam","10/19/2010 08:34 AM", "ER Growth", "Not_Yet_Read"));
			emails.add(new EmailInfo(8,"Thien Minh Tran","10/25/2010 10:13 AM", "Errors in latest UAT logs", "Sent"));
			emails.add(new EmailInfo(9,"Uy Quoc Do","10/25/2010 11:19 AM", "Security Notice: Rogue antivirus spoofs Firefox & fake antivirus software", "Deleted"));
			emails.add(new EmailInfo(10,"Thang Nhu N Tran","11/02/2010 05:25 PM", "Still Hold Sunday Futsal Activity in the A41 gym", "Sent"));
			emails.add(new EmailInfo(11,"Long Q Truong","11/02/2010 05:32 PM", "Re: Security WOW Program for 2010 - Week #2", "Deleted"));
			emails.add(new EmailInfo(12,"Garry D Gill","11/02/2010 09:19 PM", "Re:Code Review er7.5", "Not_Yet_Read"));
			emails.add(new EmailInfo(13,"Trinh L Dang","11/03/2010 10:26 AM", "Let's watch the show Doanh Nhan & The Thao - FBNC Channel tonight", "Read"));
			emails.add(new EmailInfo(14,"Huong Q Duong","11/03/2010 11:52 AM", "Re: 15-year Anniversary Party for CSC Vietnam _REGISTRATION_ Reminder", "Read"));
			emails.add(new EmailInfo(15,"Trung S Phan","11/03/2010 01:43 PM", "Re: Cancel Sunday Futsal Activity in the A41 gym", "Sent"));
			emails.add(new EmailInfo(16,"Bao T Pham","11/03/2010 05:01 PM", "Happy birthday", "Read"));
			emails.add(new EmailInfo(17,"Kevin Schlumpf","11/08/2010 11:24 PM", "Agile training - reminder", "Read"));
			emails.add(new EmailInfo(18,"CSC Buzz","11/10/2010 02:04 AM", "Engage. Celebrate. Share.", "Read"));
		}
		
		return emails;
	}
}
